home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
misc_pto
/
ad12
/
rules.ad
< prev
next >
Wrap
Text File
|
1990-02-22
|
2KB
|
99 lines
┌ Node Management Rules
│
│ ┌ Branch to Remote Node
│ │ Position cursor at local node marker
│ │ Lookup node in node table
│ │
│ │ ╒ IF not found
│ │ │ Report error
│ │ Exit
│ │ ├ ELSE
│ │ │ Load chunk containing node
│ │ │ Load/Display chunk text
│ │ └ END IF
│ │
│ │ ┌ Position cursor at selected node
│ │ │
│ │ │ ╒ IF node id is null
│ │ │ │ Position at top of chunk
│ │ │ ├ ELSE
│ │ │ │ Position at node marker
│ │ │ └ END IF
│ │ │
│ │ │ Push node on path stack
│ │ └
│ │
│ │
│ └
│
│ ┌ Add Node
│ │ Position cursor at node location
│ │ Allocate node id from NAT (Node Allocation Table)
│ │
│ │ ╒ IF node not available
│ │ │ Report error
│ ── EXIT
│ │ ├ ELSE
│ │ │ Capture node description from operator
│ │ │ Store node in node table
│ │ │ Insert local node marker
│ │ └ END IF
│ │
│ └
│
│ ┌ Add Reference to Node
│ │ Lookup node in node table
│ │
│ │ ╒ IF node not found
│ │ │ Report error
│ ── EXIT
│ │ ├ ELSE
│ │ │ Insert source of reference in xref table
│ │ └ END IF
│ │
│ └
│
│ ┌ Delete Node
│ │ Locate node in node xref table
│ │
│ │ ╒ IF node not found
│ │ │ Report error
│ ── EXIT
│ │ ├ ELSE
│ │ │
│ │ │ ╔ FOR EACH chunk in which node is referenced
│ │ │ ║ Remove node marker from chunk
│ │ │ ╚ END FOR
│ │ │
│ │ │ Delete node record
│ │ │
│ │ └ END IF
│ │
│ └
│
│ ┌ Data Structures
│ │
│ │ ┌ Node Record
│ │ │ ChunkName External name of the chunk containing node
│ │ │ NodeName External name of the node
│ │ │ NodeId Internal ID of the node (from NAT)
│ │ │ Type Node type: branch, procedure, etc.
│ │ │ Description External description of node
│ │ │ Procedure Procedure bound to node
│ │ └
│ │
│ │ ┌ Chunk Record
│ │ │ ChunkName External name of the chunk
│ │ │ NodeAllocTable (NAT) Bit map of free/allocated nodes
│ │ │ Text Chunk text
│ │ └
│ │
│ │ ┌ Node Xref Record
│ │ │ Node Internal node ID
│ │ │ ChunkIn Name of chunk in which node referenced
│ │ └
│ │
│ └
│
└